package org.oimwrapper.connectors.genericdb;

import com.thortech.util.logging.*;

/**
 * A generic connection to a database.
 */
public interface OIMDBConnection {

	/**
	 * Executes a query, and optionally processes the results.
	 * 
	 * @param Query The query to execute.
	 * @param Processor The resultProcessot to handle the results from the query, or 
	 *                  <code>null</code> does not return any results.
	 * @param ParentLogger The logger to use.
	 * @exception Exception
	 */
	public void execute(OIMQuery Query, OIMResultProcessor Processor, Logger ParentLogger) throws Exception;
	
	/**
	 * Closes the underlying database connection.
	 * 
	 * @exception Exception
	 */
	public void close() throws Exception;
}